";
var thumb_x = 76;
var thumb_y = imageHeight;
for (var i = 0; i < imageGroup.length; i++) {
var image = imageGroup[i];
// look for ourself
var image_selected = "";
if ( image.href == url ) {
image_selected = "class='TB_Selected'";
}
thumbPreloader[i] = new Image();
thumbPreloader[i].onload = function() {
//thumbPreloader[i].onload = null;
}
thumbPreloader[i].src = image.href;
var thumbImgWidth = thumbPreloader[i].width;
var thumbImgHeight = thumbPreloader[i].height;
if (thumbImgWidth > thumb_x) {
thumbImgHeight = Math.floor(thumbImgHeight * (thumb_x / thumbImgWidth));
thumbImgWidth = Math.floor(thumb_x);
if (thumbImgHeight > thumb_y) {
thumbImgWidth = Math.floor(thumbImgWidth * (thumb_y / thumbImgHeight));
thumbImgHeight = Math.floor(thumb_y);
}
}
if(thumbImgWidth < 1) {
thumbImgWidth = thumb_x;
}
if(thumbImgHeight < 1) {
thumbImgHeight = 60
}
if(jQuery('img',image).attr('src') == null) {
image_src = jQuery(image).attr('rev');
} else {
image_src = jQuery('img',image).attr('src');
}
image_src = image_src.replace(/width=(\d)*/, "width="+thumbImgWidth);
image_src = image_src.replace(/height=(\d)*/, "height="+thumbImgHeight);
additional_links += "
";
}
additional_links += "
";
jQuery("#TB_window").append("");
jQuery("#TB_window").append(additional_links);
jQuery("#TB_TopCloseWindowButton").click(TB_remove);
}
else
{
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
}
// TODO empty window content instead
jQuery("#TB_window").append("